<template>
  <div class="count">
    <h2>我是count组件</h2>
    <button @click="changeCount(2)">累加父组件给我的count</button>
    <button @click="add">查看组件实例</button>
    <p>子组件展示prop{{ count1=this.count }}</p>
    
  </div>
</template>

<script>
export default {
  name: "Count",
  data() {
    return {
      count1 : this.count
    };
  },
  props: ["count","changeCount"],
  methods: {
    add() {
      console.log(this);
      console.log(this.count);
      console.log(this.count1);
      console.log(this.$props.count);
    },
  },
};
</script>
